<?php $this -> load -> view('adminx/header'); ?>
<!-- BEGIN CONTAINER -->
<div class="page-container">
	<!-- BEGIN SIDEBAR -->
	<?php $this -> load -> view('adminx/mune'); ?>
	<!-- END SIDEBAR -->
	<!-- BEGIN CONTENT -->
	<div class="page-content-wrapper">
		<div class="page-content">
			<!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->
			<!-- /.modal -->
			<h3 class="page-title"> <?php echo $title; ?> <small><?php echo $en; ?></small></h3>
			<div class="page-bar">
				<ul class="page-breadcrumb">
					<li>
						<i class="fa fa-home"></i>
						<a href="/adminx">首页</a>
						<i class="fa fa-angle-right"></i>
					</li>
					<li>
						<a href="/iadmin/wz">抽奖</a>
						<i class="fa fa-angle-right"></i>
					</li>
					<li>
						<a href="#">添加抽奖</a>
					</li>
				</ul>
			</div>
			<!-- END PAGE HEADER-->
			<div class="clearfix"></div>
			<div class="row">
		<div class="col-lg-12 col-md-12">
			<div class="portlet light ">
				<div class="portlet-title">
							<div class="caption">
								<i class="icon-share font-red-sunglo"></i>
								<span class="caption-subject font-red-sunglo bold uppercase"> 添加抽奖</span>
							</div>
							<div class="actions">
								<a class="btn btn-circle btn-icon-only blue" href="javascript:;" onclick="alert_ts('<?php echo $this -> config -> item('xt_ts'); ?>')"> <i class=" icon-bulb"></i> </a>
								<a class="btn btn-circle btn-icon-only btn-default fullscreen" href="javascript:;"> </a>
							</div>
						</div>
				<div class="portlet-body">
					<form role="form" method="post" id="add_wz">
							<div class="form-group form-md-line-input form-md-floating-label">
								<input class="form-control required" name="name"/>
								<label>标题</label>
								<span class="help-block">必填</span>
							</div>
							
							<div class="form-group form-md-line-input form-md-floating-label">
								<input class="form-control number required" name="sort"/>
								<label>排序</label>
								<span class="help-block">越小越靠前</span>
							</div>
							<div class="form-group form-md-line-input form-md-floating-label">
								<input class="form-control number required" name="max"/>
								<label>最大抽奖金额</label>
							</div>
							<div class="form-group form-md-line-input form-md-floating-label">
								<input class="form-control number required" name="min"/>
								<label>最小抽奖金额</label>
							</div>
							<div class="form-group form-md-line-input form-md-floating-label">
								<input class="form-control number required" name="numb"/>
								<label>红包金额</label>
							</div>
							
							<div class="form-group form-md-line-input form-md-floating-label">
								<textarea class="form-control required" style="height: 100px;" name="jj"></textarea>
								<label>简介</label>
							</div>
							<div class="form-group form-md-line-input form-md-floating-label">
								<label>封面图片</label>
								<?php echo $this -> form -> doform('pic', 'pic', '', ''); ?>
							</div>
							<div class="form-group form-md-radios">
									<label>状态</label>
									<div class="md-radio-inline">
										<div class="md-radio">
											<input type="radio" id="radio5" value="1" name="state" class="md-radiobtn">
											<label for="radio5">
											<span></span>
											<span class="check"></span>
											<span class="box"></span>
											上架 </label>
										</div>
										<div class="md-radio has-success">
											<input type="radio" id="radio6" name="state" value="2" class="md-radiobtn">
											<label for="radio6">
											<span></span>
											<span class="check"></span>
											<span class="box"></span>
											下架</label>
										</div>
									</div>
								</div>
							
							<div class="form-group form-md-line-input">
								<script type="text/plain" id="myEditor" style="width:100%;height:300px;"></script>
								<textarea id="myEditor_d" class="form-control" style="display: none;" name="nr" placeholder="内容"></textarea>
							</div>
							<button type="reset" class="btn default">
								<i class="fa fa-refresh"></i>
								重置
							</button>
							<button type="submit" class="btn blue">
								<i class="fa fa-send"></i>
								添加内容
							</button>
						</form>
				</div>
			</div>
		</div>

</div>
		</div>
	</div>
	<!-- BEGIN QUICK SIDEBAR -->
	<?php $this -> load -> view('adminx/lt'); ?>
	<!-- END QUICK SIDEBAR -->
</div>
<!-- END CONTAINER -->
<!-- BEGIN FOOTER -->
<?php $this -> load -> view('adminx/footer'); ?>
<link href="/mex/global/plugins/uk/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
<script type="text/javascript" charset="utf-8" src="/mex/global/plugins/uk/umeditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/mex/global/plugins/uk/umeditor.min.js"></script>
<script type="text/javascript" src="/mex/global/plugins/uk/lang/zh-cn/zh-cn.js"></script>

<script src="/mex/global/plugins/ajaxfileupload.js"></script>
<script>
	var editorx;
	$(function() {
		var um = UM.getEditor('myEditor');
		up_form($("#add_wz"), "/iadmin/cj/add", "添加抽奖", function(msg) {
			if (msg.type == 1) {
				alert_ts('添加抽奖成功，3秒后回到抽奖列表...');
				setTimeout(function(){
					window.location.href="/iadmin/article";
				},3000);
			} else {
				alert_ts('添加抽奖失败！');
			}
		});
	}); 
</script>
